package cn.yzc.service;

import cn.yzc.pojo.Leave;

import java.sql.Timestamp;
import java.util.List;

/**
 * <p>Project: SpringPro - LeaveService</p>
 * <p>Powered by yzc On 2023-10-24 16:35:00</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
public interface LeaveService {
    /**
     * 保存请假人
     *
     * @param leave
     * @return
     */
    int save(Leave leave);

    /**
     * 查看个人请假的历史记录
     *
     * @param user
     * @return
     */
    List<Leave> queryUser(String user);

    /**
     * 修改请假
     *
     * @param leave
     * @return
     */
    int updateLeave(Leave leave);

    /**
     * 销假
     *
     * @param user
     * @return
     */
    int updateStatus(String user);

    /**
     * 待审批的请假列表
     *
     * @return
     */
    List<Leave> queryStatus();

    /**
     * 批准
     *
     * @param user
     * @return
     */
    int approve(String user, Timestamp auditdate);

    /**
     * 拒绝
     *
     * @param user
     * @param auditdate
     * @param reject
     * @return
     */
    int rejected(String user, Timestamp auditdate, String reject);

    /**
     * 查看详情
     *
     * @param id
     * @return
     */
    Leave queryParticulars(int id);
}
